home *** CD-ROM | disk | FTP | other *** search
Text File | 1988-07-19 | 2.0 KB | 91 lines | [TEXT/MPS ] |
- include "TestControl.code";
-
- include "PopUp.ctrl";
-
- /* define the first of two menus. The definition consists
- of two parts, defining the control, which happens here,
- and defining the menu embodied in the control which
- happens next */
- resource 'CNTL' (1024) {
- { 0, 0, 20, 190 },
- 2, /* initial value/selected item */
- visible,
- 1, 100, /* min and max values, actually
- placeholders since they get
- dynamically determined by the
- # of items in the menu */
- (PopUpID * 16), /* high 12 bits are rsrc id of
- the CDEF, low 4 bits are
- variant:
- 0 = left justified
- 1 = centered */
- 128, /* rsrc id of the menu to put
- in the control */
- "Baud Rate: " /* title of the control. Displayed
- to the left of the popup menu
- if not 0 length */
- };
-
- /* define the menu which goes into the first of the controls */
- resource 'MENU' (128) {
- 128,
- textMenuProc,
- allEnabled,
- enabled,
- "",
- {
- "300", noIcon, noKey, noMark, plain;
- "1200", noIcon, noKey, noMark, plain;
- "2400", noIcon, noKey, noMark, plain;
- "4800", noIcon, noKey, noMark, plain;
- "9600", noIcon, noKey, noMark, plain
- }
- };
-
-
- /* now then define a second popup menu, this one get's
- centered though */
- resource 'CNTL' (1025) {
- { 0, 0, 20, 190 },
- 1,
- visible,
- 1,
- 100,
- (PopUpID * 16) + 1, /* centered popup menu */
- 129,
- ""
- };
-
- resource 'MENU' (129) {
- 129,
- textMenuProc,
- allEnabled,
- enabled,
- "Stop Bits: ",
- {
- "1 Stop Bit", noIcon, noKey, noMark, plain;
- "1.5 Stop Bits", noIcon, noKey, noMark, plain;
- "2 Stop Bits", noIcon, noKey, noMark, plain
- }
- };
-
- /* define the dialog and it's item list */
- resource 'DLOG' (256, "PopUp Menus") {
- { 0, 0, 100, 200 },
- plainDBox,
- invisible,
- noGoAway,
- 0,
- 256,
- "Popup Menus"
- };
-
- resource 'DITL' (256) {
- {
- { 5, 75, 25, 125 }, Button { enabled, "OK" },
- { 30, 70, 50, 130 }, CheckBox { enabled, "Enabled" },
- { 55, 5, 75, 190 }, Control { enabled, 1024 },
- { 80, 5, 100, 190 }, Control { enabled, 1025 }
- }
- };
-